guess := method(
    right_num := Random value(1, 100) floor
    "Please guess the number between 1 to 100" println
    for(i,1,10,
        "input your answer:" print
        input_num := File standardInput readLine() asNumber();
        if(input_num == right_num, "You are right" println;return)
        if(i == 1,
            if(input_num < right_num,
                "Too small" println,
                "Too big" println
            )
        )
    )
)

guess